/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package service;

import java.util.List;
import javax.ejb.EJB;
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.ejb.Stateless;
import jpa.entities.Stops;
import jpa.session.StopsFacade;
import jpa.session.StopsTimesFacade;

/**
 *
 * @author julio
 */
@WebService(serviceName = "NextTime")
@Stateless()
public class NextTime {
    @EJB
    private StopsFacade ejbRefS;// Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Web Service Operation")
    @EJB
    private StopsTimesFacade ejbRefST;

    
    @WebMethod(operationName = "find")
    public Stops find(@WebParam(name = "id") Object id) {
        return ejbRefS.find(id);
    }

    @WebMethod(operationName = "findAll")
    public List<Stops> findAll() {
        return ejbRefS.findAll();
    }

    @WebMethod(operationName = "findRange")
    public List<Stops> findRange(@WebParam(name = "range") int[] range) {
        return ejbRefS.findRange(range);
    }

    @WebMethod(operationName = "count")
    public int count() {
        return ejbRefS.count();
    }
    
    
}
